package com.ds.consumer.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @program: springboot-8-springcloud
 * @description:
 * @author: Dawson.Zhang
 * @create: 2020-05-30
 **/
@Configuration
public class ConsumerConfig {

    @LoadBalanced//开启负载均衡
    @Bean
    public RestTemplate restTemplate(){

        return new RestTemplate();
    }
}
